package com.yanqu.road.entity.activity.hsisland.config;

import com.yanqu.road.entity.FieldTypeAnnotation;

@FieldTypeAnnotation(tableName = "t_s_activity_hsisland_choose")
public class HsIslandChooseConfig {

    @FieldTypeAnnotation(desc = "活动id", select = true, update = true)
    private int activityId;

    @FieldTypeAnnotation(desc = "ID", select = true, update = true)
    private int id;

    @FieldTypeAnnotation(desc = "标题")
    private String title;

    @FieldTypeAnnotation(desc = "描述")
    private String desc;

    @FieldTypeAnnotation(desc = "选项标题")
    private String chooseTitle;

    @FieldTypeAnnotation(desc = "选项图片")
    private String icon;

    @FieldTypeAnnotation(desc = "选项文本")
    private String chooseText;

    @FieldTypeAnnotation(desc = "正确奖励")
    private String trueReward;

    @FieldTypeAnnotation(desc = "错误奖励")
    private String errorReward;

    @FieldTypeAnnotation(desc = "类型")
    private String type;

    public int getActivityId() {
        return activityId;
    }

    public void setActivityId(int activityId) {
        this.activityId = activityId;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }

    public String getChooseTitle() {
        return chooseTitle;
    }

    public void setChooseTitle(String chooseTitle) {
        this.chooseTitle = chooseTitle;
    }

    public String getIcon() {
        return icon;
    }

    public void setIcon(String icon) {
        this.icon = icon;
    }

    public String getChooseText() {
        return chooseText;
    }

    public void setChooseText(String chooseText) {
        this.chooseText = chooseText;
    }

    public String getTrueReward() {
        return trueReward;
    }

    public void setTrueReward(String trueReward) {
        this.trueReward = trueReward;
    }

    public String getErrorReward() {
        return errorReward;
    }

    public void setErrorReward(String errorReward) {
        this.errorReward = errorReward;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    /**
     * 获取类型，根据index
     * @param index
     * @return
     */
    public int getTypeByIndex(int index) {
        String[] typeStrArr = this.type.split("\\|");
        return Integer.parseInt(typeStrArr[index]);
    }
}
